package class_work.chapter_1_4;

import java.util.Scanner;

/**
 * @author haomin
 * @date 2022/03/30 14:03
 **/
public class Week {
    public static void main(String[] args) throws Exception {
        System.out.println("请输入day:");
        Scanner scanner = new Scanner(System.in);
        int day = scanner.nextInt();

        switch (day){
            case 1:
                System.out.println("Monday");
                break;
            case 2:
                System.out.println("Tuesday");
                break;
            case 3:
                System.out.println("Wednesday");
                break;
            case 4:
                System.out.println("Thursday");
                break;
            case 5:
                System.out.println("Friday");
                break;
            case 6:
                System.out.println("Saturday");
                break;
            case 7:
                System.out.println("Sunday");
                break;
            default:
                throw new Exception("输入错误！day 应该为1~7");
        }
    }
}